package org.csmzxy.class2333;

class Book {
    private String title;
    private String author;
    private int pageCount;
    public Book(String title, String author, int pageCount){
        this.title = title;
        this.author = author;
        this.pageCount = pageCount;
    }
    public void displayBookDetails(){
        System.out.print("书名:" + title);
        System.out.print("作者:" + author);
        this.displayPageCount();  //使用this关键字调用其他成员方法
    }
    private void displayPageCount(){
        System.out.print("页数:" + pageCount);
    }
}
